import java.util.Arrays;

public class J2411072 {
    public static void main(String[] args) {
        Myarray<String> myarray = new Myarray<>();

        myarray.set(0,"hyf");
        myarray.set(1,"ztms");
        String str = myarray.get(1);
        System.out.println(str);

        Myarray <Integer>myarray1 = new Myarray<>();
        myarray1.set(0,24);
        myarray1.set(1,25);
        int str2 = myarray1.get(1);
        System.out.println(str2);

        Object[] array2 = myarray.getArray();
        System.out.println(Arrays.toString(array2));
    }
}
class Myarray<T>{
    public Object array[] = new Object[10];

    public void set(int pos,T val){
        array[pos] = val;
    }
    public T get(int pos){
        return (T)array[pos];
    }
    public Object[] getArray(){
        return array;
    }
}
